package com.hhkj.api.course.controller;

import com.hhkj.api.course.model.req.ApiCoursePriceReq;
import com.hhkj.api.course.service.biz.ApiSaleCoursePriceBizService;
import com.hhkj.api.sale.common.session.model.LoginSale;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.framework.login.api.ApiLogin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ApiSaleCoursePriceController
 *
 * @author zheng
 * @since 2023/11/2 21:30
 */
@RequestMapping("/api/sale/course/price")
@RestController
public class ApiSaleCoursePriceController extends BaseController {

    @Autowired
    private ApiSaleCoursePriceBizService coursePriceBizService;

    /**
     * 列表
     */
    @ApiLogin(LoginSale.class)
    @PostMapping("/list")
    public TableDataInfo list(@Validated @RequestBody ApiCoursePriceReq req) {
        return getDataTable(coursePriceBizService.list(req));
    }

}
